package com.dg11185.nearshop.net.request;

import com.dg11185.libs.network.http.client.HttpRequest;
import com.dg11185.libs.utils.MD5.MD5Utils;
import com.dg11185.nearshop.app.Constants;
import com.dg11185.nearshop.net.response.GetCardListResponse;

/**
 * 
 * @author wanliang527
 * @date 2014-5-19
 */
public class GetCardListRequest extends HttpRequest<GetCardListResponse> {

    public GetCardListRequest(String loginName) {
        super(Constants.ADDRESS, Constants.getList);
        addParam("loginName", loginName);
        addParam("chshToken", Constants.TOKEN);
        addParam("chshSign", MD5Utils.getMD5Str(getParams(), Constants.MD5_key));
    }

    @Override
    protected GetCardListResponse parseJson(String response) throws Exception {
        GetCardListResponse res = new GetCardListResponse();
        res.parseJson(response);
        return res;
    }

}
